from django.contrib import admin
from django.utils.translation import ugettext_lazy

from student.models import *

admin.site.site_header = "淘淘后端管理系统"
admin.site.site_title = "淘淘后端管理系统"


# Register your models here.
class StudentAdmin(admin.ModelAdmin):
    list_display = ('id', 'name', 'password', 'image', 'sex', 'signature', 'point', 'buyNum', 'phone')


class ProductListAdmin(admin.ModelAdmin):
    list_display = (
        'id', 'name', 'description', 'type', 'price', 'num', 'seller', 'image', 'sellerCode', 'sellerPhone',
        'timeAndPlace')


class NeedListAdmin(admin.ModelAdmin):
    list_display = ('id', 'username', 'description', 'time')


class OrderListAdmin(admin.ModelAdmin):
    list_display = ('id', 'time', 'buyerUsername', 'number', 'total', 'pid')


class ShoppingCartAdmin(admin.ModelAdmin):
    list_display = ('id', 'username', 'productID')


admin.site.register(Student, StudentAdmin)
admin.site.register(ProductList, ProductListAdmin)
admin.site.register(NeedList, NeedListAdmin)
admin.site.register(OrderList, OrderListAdmin)
admin.site.register(ShoppingCart, ShoppingCartAdmin)
